from django_filters import rest_framework

from apps.elements.models import Element


class ElementFilter(rest_framework.FilterSet):
    name = rest_framework.CharFilter(lookup_expr='contains')
    page_id = rest_framework.BaseInFilter(lookup_expr='in')

    class Meta:
        model = Element
        fields = ['name', 'by', 'project', 'page_id']
